<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Loop_control (infer.Checkers.Loop_control)</title><meta charset="utf-8"/><link rel="stylesheet" href="../../../odoc.support/odoc.css"/><meta name="generator" content="odoc 2.4.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../odoc.support/highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">infer</a> &#x00BB; <a href="../index.html">Checkers</a> &#x00BB; Loop_control</nav><header class="odoc-preamble"><h1>Module <code><span>Checkers.Loop_control</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec value anchored" id="val-get_all_nodes_upwards_until"><a href="#val-get_all_nodes_upwards_until" class="anchor"></a><code><span><span class="keyword">val</span> get_all_nodes_upwards_until : 
  <span><a href="../../IR/Procdesc/Node/index.html#type-t">IR.Procdesc.Node.t</a> <span class="arrow">&#45;&gt;</span></span>
  <span><span><a href="../../IR/Procdesc/Node/index.html#type-t">IR.Procdesc.Node.t</a> list</span> <span class="arrow">&#45;&gt;</span></span>
  <a href="../Control/GuardNodes/index.html#type-t">Control.GuardNodes.t</a></span></code></div><div class="spec-doc"><p>Starting from the start_nodes, find all the nodes upwards until the target is reached, i.e picking up predecessors which have not been already added to the found_nodes</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-get_loop_head_to_source_nodes"><a href="#val-get_loop_head_to_source_nodes" class="anchor"></a><code><span><span class="keyword">val</span> get_loop_head_to_source_nodes : 
  <span><a href="../../IR/Procdesc/index.html#type-t">IR.Procdesc.t</a> <span class="arrow">&#45;&gt;</span></span>
  <span><span><a href="../../IR/Procdesc/Node/index.html#type-t">IR.Procdesc.Node.t</a> list</span> <span class="xref-unresolved">IR</span>.Procdesc.NodeMap.t</span></span></code></div><div class="spec-doc"><p>Since there could be multiple back-edges per loop, collect all source nodes per loop head. loop_head (target of back-edges) --&gt; source nodes</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-get_loop_control_maps"><a href="#val-get_loop_control_maps" class="anchor"></a><code><span><span class="keyword">val</span> get_loop_control_maps : 
  <span><span><span><a href="../../IR/Procdesc/Node/index.html#type-t">IR.Procdesc.Node.t</a> list</span> <span class="xref-unresolved">IR</span>.Procdesc.NodeMap.t</span> <span class="arrow">&#45;&gt;</span></span>
  <a href="../Control/index.html#type-loop_control_maps">Control.loop_control_maps</a></span></code></div><div class="spec-doc"><p>Get a pair of maps (exit_map, loop_head_to_guard_map) where exit_map : exit_node -&gt; loop_head set (i.e. target of the back edges) loop_head_to_guard_map : loop_head -&gt; guard_nodes and guard_nodes contains the nodes that may affect the looping behavior, i.e. occur in the guard of the loop conditional.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-get_loop_head_to_loop_nodes"><a href="#val-get_loop_head_to_loop_nodes" class="anchor"></a><code><span><span class="keyword">val</span> get_loop_head_to_loop_nodes : 
  <span><span><span><a href="../../IR/Procdesc/Node/index.html#type-t">IR.Procdesc.Node.t</a> list</span> <span class="xref-unresolved">IR</span>.Procdesc.NodeMap.t</span> <span class="arrow">&#45;&gt;</span></span>
  <span><a href="../Control/GuardNodes/index.html#type-t">Control.GuardNodes.t</a> <span class="xref-unresolved">Checkers</span>.Control.LoopHeadToGuardNodes.t</span></span></code></div><div class="spec-doc"><p>Get a map from loop head -&gt; all the nodes included in the corresponding loop</p></div></div></div></body></html>
